import React, { PureComponent, Component } from 'react';
import {
    View,
    Text,
    StyleSheet,
    TouchableOpacity,
    ActivityIndicator
} from 'react-native'
import Style from '../utils/style/style'
export default class PageLoading extends PureComponent {
    constructor(props) {
        super(props)
    }

    render() {
        return (

            <View style={styles.item}>
                {
                    this.props.hasMore ?
                        <View style={Style.flex1}>
                            {
                                this.props.loading ?
                                    <View style={Style.flex1}>
                                        <ActivityIndicator style={Style.centered} />
                                    </View>
                                    :
                                    <View >
                                        <Text style={Style.centered}>加载更多</Text>
                                    </View>
                            }
                        </View>
                        :
                        <View style={Style.flex1}>
                            <Text style={Style.centered}>已经没有更多了</Text>
                        </View>
                }
            </View>

        )
    }
}
const styles = StyleSheet.create({
    item: {
        height: 40,
        width: 375,
        backgroundColor: '#fff'
    },
})